package com.blueheart.music.mapper;

import com.blueheart.music.model.pojo.Singer;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SingerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Singer record);

    int insertSelective(Singer record);

    Singer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Singer record);

    int updateByPrimaryKey(Singer record);
    /**
     * 查询所有歌手
     */
    List<Singer> selectAll();
    /**
     * 根据歌手名字模糊查询歌手
     */
    List<Singer> selectByName(String name);

    /**
     * 重名查询
     * @param name
     * @return
     */
    Singer selectName(String name);
    /**
     * 根据性别查询歌手
     */
    List<Singer> selectBySex(Byte sex);
}